package com.dnjn.happiness.biz.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dnjn.happiness.biz.domain.HappinessScores;
import com.dnjn.happiness.biz.domain.RewardPunishment;
import com.dnjn.happiness.biz.mapper.RewardPunishmentMapper;
import com.dnjn.happiness.biz.service.IRewardPunishmentService;
import com.dnjn.happiness.common.core.model.ModelHappinessScores;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 奖惩Service业务层处理
 *
 * @author happiness
 * @date 2023-10-19
 */
@Service
public class RewardPunishmentServiceImpl extends ServiceImpl<RewardPunishmentMapper, RewardPunishment> implements IRewardPunishmentService {

    @Override
    public Page<RewardPunishment> getPage(Page page, Map<String, Object> map) {
        return baseMapper.getPage(page, map);
    }

    @Override
    public List<RewardPunishment> getRewardPunishmentList(Long userId) {
        return baseMapper.getRewardPunishmentList(userId);
    }

    @Override
    public List<ModelHappinessScores> getRewardPunishmentHappinessScores(Long userId) {

        return baseMapper.getRewardPunishmentHappinessScores(userId);
    }

    @Override
    public HappinessScores getTotalRecord(Long userId) {
        return baseMapper.getTotalRecord(userId);
    }
}
